import request from '@/utils/axios'

export type SocialUserType = {
  id: number
  type: number
  openid: string
  token: string
  rawTokenInfo: string
  nickname: string
  avatar: string
  rawUserInfo: string
  code: string
  state: string
}

export interface SocialUserPageReqType extends PageParam {
  type?: string
  nickname?: string
  openid?: string
  create_time?: string[]
}

/**
 * 三方登录 三方用户接口
 */
export const SocialUserApi = {
  // 查询分页列表
  page: (params: SocialUserPageReqType) => {
    return request.get({ url: '/system/social-user/page', params, is_mock: true })
  },
  // 详情
  detail: (id: number) => {
    return request.get({ url: '/system/social-user/get?id=' + id, is_mock: true })
  }
}
